package com.bawei.model_sevent.Activity.Fragemnt;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;

import com.bawei.model_sevent.Activity.Adapter.ClassAdapter;
import com.bawei.model_sevent.Activity.Banner.BannerBean;
import com.bawei.model_sevent.Activity.Banner.BannerContent;
import com.bawei.model_sevent.Activity.Banner.BannerModel;
import com.bawei.model_sevent.Activity.Banner.BannerPreson;
import com.bawei.model_sevent.R;

import java.util.List;


public class BlankFragment2 extends Fragment implements BannerContent.View {


    private RecyclerView recy02;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View inflate = inflater.inflate(R.layout.fragment_blank2, container, false);
        recy02 =inflate.findViewById(R.id.recy_02);
        recy02.setLayoutManager(new StaggeredGridLayoutManager(3,StaggeredGridLayoutManager.VERTICAL));
        BannerPreson bannerPreson = new BannerPreson(new BannerModel(), this);
        bannerPreson.GetDate("2","11");
        return inflate;
    }

    @Override
    public void initAdapter(List<BannerBean.DataBean> bannerList) {
        ClassAdapter classAdapter = new ClassAdapter(bannerList);
        recy02.setAdapter(classAdapter);
    }
    
}